Skip to content

Conversation

@xpcmdshell
Copy link
Owner

Summary

  • MCP tools now grouped under a single namespace (YAML name: field) instead of flat registration
  • Access pattern: tools.time.get_current_time() instead of tools.get_current_time()
  • Breaking change: MCPAdapter requires namespace parameter

Changes

  • MCPAdapter.__init__, connect_stdio, connect_sse require namespace: str
  • _refresh_tools returns ONE Tool with all MCP tools as callables
  • call_tool uses callable_name to identify the actual MCP tool
  • describe() now properly matches on callable_name
  • Updated docs with naming guidance (use web not fetch)
  • Renamed fetch.yaml to name: web to avoid tools.fetch.fetch()

Testing

  • All 24 MCP adapter tests pass
  • All 63 integration tests pass

Closes: py-code-mode-6y4

MCP tools are now grouped under a single namespace instead of being
registered flat. Access pattern changes from tools.get_current_time()
to tools.time.get_current_time().

- MCPAdapter requires namespace parameter (breaking change)
- _refresh_tools returns ONE Tool with MCP tools as callables
- call_tool uses callable_name to identify the actual MCP tool
- describe() now properly matches on callable_name
- Updated docs with naming guidance (use 'web' not 'fetch')
- Renamed fetch.yaml to name: web to avoid tools.fetch.fetch()

Closes: py-code-mode-6y4
Add to_dict() methods to ToolParameter, ToolCallable, and Tool dataclasses
to provide proper JSON serialization. Update list_tools() and search_tools()
in all executors to use to_dict() for consistent output.

Before: {'name': 'curl', 'description': '...', 'tags': []}
After:  {'name': 'curl', 'description': '...', 'tags': [], 'callables': [...]}
@xpcmdshell xpcmdshell merged commit ec6b942 into main Jan 2, 2026
2 checks passed
@xpcmdshell xpcmdshell deleted the feat/mcp-namespacing branch January 2, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants